﻿' this class is used to create a message object which is exchanged during
' chatroom conversations. The thread listening to messages on sockets will
' recieve these message objects and detect where it is supp to go. It will
' then send the object to the appropriate chatroom
Public Class ChatroomMsg
    Private chatroomId As Integer
    Private strMessage As String
    Private msgSenderName As String
    Private msgSenderIP As String
    Private msgRecieverName As String
    Private msgRecieverIP As String
    Private alChatterIPs As ArrayList

    Public Sub New(ByVal chatroomid As Integer, ByVal senderName As String, ByVal senderIP As String, ByVal listOfChatterIPs As ArrayList)
        Me.chatroomId = chatroomid
        Me.msgSenderIP = senderIP
        Me.msgSenderName = senderName
        Me.alChatterIPs = listOfChatterIPs
    End Sub

    Public Function getListOfChatterIPs()
        Return Me.alChatterIPs
    End Function

    Public Function getSenderIP()
        Return Me.msgSenderIP
    End Function

    Public Function getSenderName()
        Return Me.msgSenderName
    End Function

    Public Function getChatroomId()
        Return Me.chatroomId
    End Function

    Public Sub setMessage(ByVal msg As String)
        Me.strMessage = msg
    End Sub

    Public Function getMessage()
        Return Me.strMessage
    End Function

    Public Sub setRecieverName(ByVal recName As String)
        Me.msgRecieverName = recName
    End Sub

    Public Function getRecieverName()
        Return Me.msgRecieverName
    End Function

    Public Sub setRecieverIP(ByVal recIP As String)
        Me.msgRecieverIP = recIP
    End Sub

    Public Function getRecieverIP()
        Return Me.msgRecieverIP
    End Function
End Class
